package org.example.chatservice.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.Set;

@Data
@Document(collection = "chat_rooms")
public class ChatRoom {
    @Id
    private String id;
    private String name;
    private String creatorId;
    private Set<String> participants = new HashSet<>();
    private LocalDateTime createdAt;
    private ChatType type;

    public enum ChatType {
        PRIVATE,
        GROUP
    }
}